package com.yunkeji.api.call.bo;

import com.yunkeji.common.enums.app.AppUserOnlineStatus;
import lombok.Data;

/**
 * redis状态控制对象
 *
 * @author 老张
 */
@Data
public class StatusObject {

    // rediskey
    private long uid;
    // 需要修改的状态
    private int modifyStatus;
    // 当前的状态
    private int currentStatus;
    // 过期时间
    private int expire;
    // 是否有修改
    private int modifyFlag;
    // 话单ucid
    private String ucid;

    public StatusObject(
            long uid,
            int modifyStatus,
            int currentStatus,
            int expire,
            int modifyFlag,
            String ucid) {
        this.uid = uid;
        this.modifyStatus = modifyStatus;
        this.currentStatus = currentStatus;
        this.expire = expire;
        this.modifyFlag = modifyFlag;
        this.ucid = ucid;
    }

    @Override
    public String toString() {
        return "StatusObject{"
                + "uid="
                + uid
                + ", modifyStatus="
                + AppUserOnlineStatus.getByCode(modifyStatus).name()
                + ", currentStatus="
                + AppUserOnlineStatus.getByCode(currentStatus).name()
                + ", expire="
                + expire
                + ", modifyFlag="
                + modifyFlag
                + '}';
    }
}
